<template>
  <div class="spin-bg" v-if="isloading">
    <a-spin tip="加载中..." style="position: absolute;"/>
  </div>
  <router-view />
</template>


<script>
import store from "@/store";
import { defineComponent, computed } from "vue";

export default defineComponent({
  name: "app",
  setup() {
    return {
      isloading: computed(() => store.getters.isloading),
    }
  }
})
</script>
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;
}

nav a {
  font-weight: bold;
  color: #2c3e50;
}

nav a.router-link-exact-active {
  color: #42b983;
}
.spin-bg{
  width: 100%;
  height: 100Vh;
  background: rgba(0,0,0,0.2);
  position: absolute;
  z-index: 1001;
}
.ant-spin{
  top: 40%;
}
</style>
